home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.20031118-20041115 / 000031_JDanSkinner@JDanSkinner.com_Tue Dec 2 09:31:17 2003.msg < prev    next >
Internet Message Format  |  2020-01-01  |  3KB

  1. Path: newsmaster.cc.columbia.edu!phl-feed.news.verio.net!nntp1.tagonline.com!nycmny1-snf1.gtei.net!news.gtei.net!colt.net!newspump.monmouth.com!newspeer.monmouth.com!hermes.visi.com!news-out.visi.com!petbe.visi.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews1.google.com!not-for-mail
  2. From: JDanSkinner@JDanSkinner.com (Dan Skinner)
  3. Newsgroups: comp.protocols.kermit.misc
  4. Subject: message to newexpectuser
  5. Date: 1 Dec 2003 18:46:34 -0800
  6. Organization: http://groups.google.com
  7. Lines: 62
  8. Message-ID: <8ce22d01.0312011846.dba6025@posting.google.com>
  9. NNTP-Posting-Host: 24.159.192.106
  10. Content-Type: text/plain; charset=ISO-8859-1
  11. Content-Transfer-Encoding: 8bit
  12. X-Trace: posting.google.com 1070333194 21965 127.0.0.1 (2 Dec 2003 02:46:34 GMT)
  13. X-Complaints-To: groups-abuse@google.com
  14. NNTP-Posting-Date: Tue, 2 Dec 2003 02:46:34 +0000 (UTC)
  15. Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:14707
  16.  
  17. Date: 2003-12-01 06:25:58 PST 
  18. newexpextuser asked
  19. "What I don't understand is with the above "ftp rename \m(nameonly)
  20. ../ready/\m(nameonly)", how does this avoid moving the partial file
  21. from the working directory to the ready directory, there will still be
  22. a file in the working directory albeit a partial file and this command
  23. will move it along to the ready directory."
  24.  
  25. Date: 2003-12-01 08:43:26 PST 
  26. Frank answers
  27. "The lines preceding the "ftp rename" command are:
  28.  
  29.   ftp put /delete \m(filename)
  30.   if fail exit 1 ftp put \m(filename): \v(ftp_message)
  31.  
  32. Thus the "ftp rename" command won't be reached if "ftp put" fails.
  33. This is exactly the reason that we recommend that each critical step
  34. be checked with IF FAIL -- you don't want the script to proceed in
  35. cases where the subsequent commands require the preceding ones to
  36. succeed.
  37.  
  38. Of course conditional command in the IF statement need not be EXIT; it
  39. can be anything you want, even a series of commands, e.g.:
  40.  
  41.   if fail {
  42.       command1
  43.       command2
  44.       ...
  45.   } else {        ; The ELSE part is optional
  46.       command1
  47.       command2
  48.       ...
  49.   }
  50.  
  51. - Frank"
  52.  
  53. Date: 2003-12-01 09:52:52 PST 
  54. newexpextuser asked
  55. "I appreciate your input.
  56.  
  57. However, I have gone through several articles on the website,
  58. searching through the newsgroups and reviewing case studies and have
  59. not found anything that addresses the issue I am having.
  60.  
  61. If there is online training or even classroom training, I'd find this
  62. as being beneficial.
  63.  
  64. The case study I was pointed to, mentioned ftping a file to a central
  65. server in a "working" directory where another script running on the
  66. central server would look for files in a "ready" directory. I can
  67. understand this concept, as it is obvious you wouldn't want to process
  68. a file that is still being in transit.
  69.  
  70. It goes on to suggest of having the script move the file from the
  71. working directory to the ready directory, but what if there is a
  72. partial file there, it would still try to move this partial file and
  73. try to process it."
  74.  
  75. Now my post:
  76. We would be pleased to provide custom classroom training on Kermit scripting
  77. Regards...Dan.
  78. JDanSkinner.com
  79.